home *** CD-ROM | disk | FTP | other *** search
- class classes.fx.GunSmoke
- {
- var id;
- var x;
- var y;
- var clip;
- var xMov;
- var yMov;
- var c;
- var cMax;
- var alphaStart;
- var Name = "gunSmoke";
- function GunSmoke(px, py, pid)
- {
- this.id = pid;
- this.x = px;
- this.y = py;
- _root.d = _root.d + 1;
- this.clip = _root.attachMovie("gunSmoke","gunSmoke" + this.id + "Clip",_root.d + 499990);
- this.clip._x = this.x;
- this.clip._y = this.y;
- this.xMov = _root.randRange2(-0.5,0.5);
- this.yMov = _root.randRange2(-1,-3);
- this.c = 0;
- this.cMax = _root.randRange(15,30);
- this.alphaStart = _root.randRange(50,110);
- var _loc3_ = _root.randRange2(0.7,1.2);
- this.clip._xscale *= _loc3_;
- this.clip._yscale *= _loc3_;
- }
- function main()
- {
- this.c = this.c + 1;
- if(this.c == this.cMax)
- {
- _root.removeFX("gunSmoke" + this.id);
- }
- this.yMov *= 1.03;
- this.clip._alpha = this.alphaStart - this.c * (this.alphaStart / this.cMax);
- this.clip._xscale *= 1.04;
- this.clip._yscale *= 1.04;
- this.x += this.xMov;
- this.y += this.yMov;
- this.clip._x = this.x;
- this.clip._y = this.y;
- }
- }
-